package com.minimalist.common.entity.lindi.vo.purchaseindexrecord;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @author 11987
 */

@Schema(name = "林地指标交易平台_购买指标记录实体")
public class LindiPurchaseIndexRecordQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "purchaseIndexRecordCode", description = "编号", type = "string")
    private String purchaseIndexRecordCode;

    @Schema(name = "purchaseTime", description = "购买时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime purchaseTime;

    @Schema(name = "purchaseTimeStart", description = "购买时间开始", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime purchaseTimeStart;

    @Schema(name = "purchaseTimeEnd", description = "购买时间结束", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime purchaseTimeEnd;

    public LindiPurchaseIndexRecordQueryVO(){
    }

    public String getPurchaseIndexRecordCode() {
        return purchaseIndexRecordCode;
    }

    public void setPurchaseIndexRecordCode(String purchaseIndexRecordCode) {
        this.purchaseIndexRecordCode = purchaseIndexRecordCode;
    }

    public LocalDateTime getPurchaseTime(){
        return purchaseTime;
    }

    public void setPurchaseTime(LocalDateTime purchaseTime){
        this.purchaseTime = purchaseTime;
    }

    public LocalDateTime getPurchaseTimeStart() {
        return purchaseTimeStart;
    }

    public void setPurchaseTimeStart(LocalDateTime purchaseTimeStart) {
        this.purchaseTimeStart = purchaseTimeStart;
    }

    public LocalDateTime getPurchaseTimeEnd() {
        return purchaseTimeEnd;
    }

    public void setPurchaseTimeEnd(LocalDateTime purchaseTimeEnd) {
        this.purchaseTimeEnd = purchaseTimeEnd;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        if (!super.equals(o)){
            return false;
        }
        LindiPurchaseIndexRecordQueryVO that = (LindiPurchaseIndexRecordQueryVO) o;
        return Objects.equals(purchaseIndexRecordCode, that.purchaseIndexRecordCode) && Objects.equals(purchaseTime, that.purchaseTime) && Objects.equals(purchaseTimeStart, that.purchaseTimeStart) && Objects.equals(purchaseTimeEnd, that.purchaseTimeEnd);
    }

    @Override
    public int hashCode(){
        return Objects.hash(super.hashCode(), purchaseIndexRecordCode, purchaseTime, purchaseTimeStart, purchaseTimeEnd);
    }
}
